#ifndef __MEMBUF_T_HH__
#define __MEMBUF_T_HH__

#include <iostream>
using namespace std;

struct membuf_t {
  membuf_t() { buf = 0; buf_len = 0; }
  membuf_t(char* b, size_t blen) { buf = b; buf_len = blen; }

  void save(ostream& out) const;
  void load(istream& in);

  char* buf;
  size_t buf_len;
};

#endif
